package com.janj.bean;

import java.util.Objects;

public class Hero {
    private Integer id ;
    private String name ;
    private Integer age ;
    private  String nice;
    private String star ;

    public Hero() {
    }

    public Hero(Integer id, String name, Integer age, String nice, String star) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.nice = nice;
        this.star = star;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getNice() {
        return nice;
    }

    public void setNice(String nice) {
        this.nice = nice;
    }

    public String getStar() {
        return star;
    }

    public void setStar(String star) {
        this.star = star;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Hero hero = (Hero) o;
        return Objects.equals(id, hero.id) &&
                Objects.equals(name, hero.name) &&
                Objects.equals(age, hero.age) &&
                Objects.equals(nice, hero.nice) &&
                Objects.equals(star, hero.star);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, age, nice, star);
    }

    @Override
    public String toString() {
        return "Hero{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", nice='" + nice + '\'' +
                ", star='" + star + '\'' +
                '}';
    }
}
